﻿using System;
using System.Text;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.Data.Schema.UnitTesting;
using Microsoft.Data.Schema.UnitTesting.Conditions;

namespace SSISDBExtensions.Test
{
    [TestClass()]
    public class GetDistinctETLJobStageOrder : DatabaseTestClass
    {

        public GetDistinctETLJobStageOrder()
        {
            InitializeComponent();
        }

        [TestInitialize()]
        public void TestInitialize()
        {
            base.InitializeTest();
        }
        [TestCleanup()]
        public void TestCleanup()
        {
            base.CleanupTest();
        }

        [TestMethod()]
        public void GetDistinctETLJobStageOrder_BasicTest()
        {
            DatabaseTestActions testActions = this.GetDistinctETLJobStageOrder_BasicTestData;
            // Execute the pre-test script
            // 
            System.Diagnostics.Trace.WriteLineIf((testActions.PretestAction != null), "Executing pre-test script...");
            ExecutionResult[] pretestResults = TestService.Execute(this.PrivilegedContext, this.PrivilegedContext, testActions.PretestAction);
            // Execute the test script
            // 
            System.Diagnostics.Trace.WriteLineIf((testActions.TestAction != null), "Executing test script...");
            ExecutionResult[] testResults = TestService.Execute(this.ExecutionContext, this.PrivilegedContext, testActions.TestAction);
            // Execute the post-test script
            // 
            System.Diagnostics.Trace.WriteLineIf((testActions.PosttestAction != null), "Executing post-test script...");
            ExecutionResult[] posttestResults = TestService.Execute(this.PrivilegedContext, this.PrivilegedContext, testActions.PosttestAction);
        }

        #region Designer support code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            Microsoft.Data.Schema.UnitTesting.DatabaseTestAction GetDistinctETLJobStageOrder_BasicTest_TestAction;
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GetDistinctETLJobStageOrder));
            Microsoft.Data.Schema.UnitTesting.Conditions.RowCountCondition GetDistinctETLJobStageOrder_BasicTest_NumberOfRows;
            Microsoft.Data.Schema.UnitTesting.DatabaseTestAction GetDistinctETLJobStageOrder_BasicTest_PretestAction;
            Microsoft.Data.Schema.UnitTesting.DatabaseTestAction GetDistinctETLJobStageOrder_BasicTest_PosttestAction;
            Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder;
            Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally;
            this.GetDistinctETLJobStageOrder_BasicTestData = new Microsoft.Data.Schema.UnitTesting.DatabaseTestActions();
            GetDistinctETLJobStageOrder_BasicTest_TestAction = new Microsoft.Data.Schema.UnitTesting.DatabaseTestAction();
            GetDistinctETLJobStageOrder_BasicTest_NumberOfRows = new Microsoft.Data.Schema.UnitTesting.Conditions.RowCountCondition();
            GetDistinctETLJobStageOrder_BasicTest_PretestAction = new Microsoft.Data.Schema.UnitTesting.DatabaseTestAction();
            GetDistinctETLJobStageOrder_BasicTest_PosttestAction = new Microsoft.Data.Schema.UnitTesting.DatabaseTestAction();
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder = new Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition();
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally = new Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition();
            // 
            // GetDistinctETLJobStageOrder_BasicTest_TestAction
            // 
            GetDistinctETLJobStageOrder_BasicTest_TestAction.Conditions.Add(GetDistinctETLJobStageOrder_BasicTest_NumberOfRows);
            GetDistinctETLJobStageOrder_BasicTest_TestAction.Conditions.Add(GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder);
            GetDistinctETLJobStageOrder_BasicTest_TestAction.Conditions.Add(GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally);
            resources.ApplyResources(GetDistinctETLJobStageOrder_BasicTest_TestAction, "GetDistinctETLJobStageOrder_BasicTest_TestAction");
            // 
            // GetDistinctETLJobStageOrder_BasicTest_NumberOfRows
            // 
            GetDistinctETLJobStageOrder_BasicTest_NumberOfRows.Enabled = true;
            GetDistinctETLJobStageOrder_BasicTest_NumberOfRows.Name = "GetDistinctETLJobStageOrder_BasicTest_NumberOfRows";
            GetDistinctETLJobStageOrder_BasicTest_NumberOfRows.ResultSet = 1;
            GetDistinctETLJobStageOrder_BasicTest_NumberOfRows.RowCount = 1;
            // 
            // GetDistinctETLJobStageOrder_BasicTest_PretestAction
            // 
            resources.ApplyResources(GetDistinctETLJobStageOrder_BasicTest_PretestAction, "GetDistinctETLJobStageOrder_BasicTest_PretestAction");
            // 
            // GetDistinctETLJobStageOrder_BasicTest_PosttestAction
            // 
            resources.ApplyResources(GetDistinctETLJobStageOrder_BasicTest_PosttestAction, "GetDistinctETLJobStageOrder_BasicTest_PosttestAction");
            // 
            // GetDistinctETLJobStageOrder_BasicTestData
            // 
            this.GetDistinctETLJobStageOrder_BasicTestData.PosttestAction = GetDistinctETLJobStageOrder_BasicTest_PosttestAction;
            this.GetDistinctETLJobStageOrder_BasicTestData.PretestAction = GetDistinctETLJobStageOrder_BasicTest_PretestAction;
            this.GetDistinctETLJobStageOrder_BasicTestData.TestAction = GetDistinctETLJobStageOrder_BasicTest_TestAction;
            // 
            // GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder
            // 
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder.ColumnNumber = 1;
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder.Enabled = true;
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder.ExpectedValue = "1";
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder.Name = "GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder";
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder.NullExpected = false;
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder.ResultSet = 1;
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageOrder.RowNumber = 1;
            // 
            // GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally
            // 
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally.ColumnNumber = 2;
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally.Enabled = true;
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally.ExpectedValue = "2";
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally.Name = "GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally";
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally.NullExpected = false;
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally.ResultSet = 1;
            GetDistinctETLJobStageOrder_BasicTest_ETLJobStageTally.RowNumber = 1;
        }

        #endregion


        #region Additional test attributes
        //
        // You can use the following additional attributes as you write your tests:
        //
        // Use ClassInitialize to run code before running the first test in the class
        // [ClassInitialize()]
        // public static void MyClassInitialize(TestContext testContext) { }
        //
        // Use ClassCleanup to run code after all tests in a class have run
        // [ClassCleanup()]
        // public static void MyClassCleanup() { }
        //
        #endregion

        private DatabaseTestActions GetDistinctETLJobStageOrder_BasicTestData;
    }
}
